<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use backend\models\system\Menu;

/* @var $this yii\web\View */
/* @var $model backend\models\system\search\MenuSearch */
/* @var $form yii\widgets\ActiveForm */

?>

<?php $form = ActiveForm::begin([
    'action' => ['index'],
    'method' => 'get',
    'fieldConfig' => [
        'template' => '{input}',
    ],
    'options'=>[
        'class'=>"form-inline",
        'data-pjax' => true, //开启pjax搜索
    ]
]); ?>
<div class="panel panel-default">
    <div class="panel-heading">
        <div class="panel-heading-box">
            <h3 class="panel-title"><i class="glyphicon glyphicon-search"></i></h3>
        </div>
    </div>
    <div class="panel-body">
        <?= $form->field($model, 'title')->textInput(['placeholder'=>'标题']) ?>
        <?=$form->field($model, 'status')->dropDownList(['' => '全部'] + Menu::getStatus(),['class'=>'form-control']); ?>

        <div class="form-group">
            <?= Html::submitButton('<i class="fa fa-search"></i>搜索', ['class' => 'btn btn-primary']); ?>
            <?= Html::a('<i class="fa fa-refresh"></i>重置',['index'],['data-pjax'=> 1,'class'=>'btn btn-default','title'=> '重置']) ?>
            <?php //Html::resetButton('<i class="fa fa-refresh"></i>重置', ['class' => 'btn btn-default']) ?>
        </div>
    </div>

</div>
<?php ActiveForm::end(); ?>
